—refetch —aggressive

Source

  • this error might happen during a git fetch:
git fetch
Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.
warning: The last gc run reported the following. Please correct the root cause
and remove .git/gc.log
Automatic cleanup will not be performed until the file is removed.
 
fatal: bad tree object 9213e6d7ad31bde664dd103745302c3750cbecbd
fatal: failed to run repack
  • it can be resolved by running
git fetch --refetch
git gc --aggressive